1. Field of the Invention
The present invention relates generally to segmentation and in particular, to a computer implemented, method, system, and computer usable code for dynamically implementing segmentation offloading based on processor utilization.
2. Description of the Related Art
Data communications have grown exponentially in recent years because of enhanced communications standards and network availability. Transmission control protocol (TCP) is a standard that ensures that packets of data are delivered and received in the same order they were sent and Internet Protocol (IP) is used in conjunction with TCP to designate how information travels between systems across the Internet. Most computers have a network interface card that uses the TCP/IP protocols to send and receive information through a network.
In a traditional network interface card, the TCP stack uses the system processor to break a TCP segment down into Ethernet frames before passing the data to the network interface card. This requires a large amount of processing time, especially in a Gigabit network where a network interface card can generate tens of thousands of interrupts per second. These interrupts utilize even more processor cycles.
In TCP segmentation offload, also known as “large send”, the host TCP protocol stack creates a large TCP segment, up to 64 KB in size. This large segment is then passed to the IP Protocol stack, where the segment is encapsulated in a single IP packet. The encapsulated segment is then passed to the network interface card device driver using just one interrupt and finally to the network interface card for transmission. The network interface card which implements TCP segmentation offload then resegments this single large TCP segment into multiple smaller TCP segments which are typically 1460 bytes for a standard Ethernet connection and inserts the necessary Ethernet/IP/TCP header information for each segment.
The performance benefit of using segmentation offloading is gained by the fact that larger packets can be built by the host TCP stack, which typically translates into reduced host processor utilization. An additional performance benefit is gained by virtue of the fact that, in general, larger PCI data transactions translate into higher PCI bus throughput. Since the work of segmenting the buffer into Ethernet frames is done by the network interface card, the processor is available to perform other tasks.
Throughput is a measure of the amount of data transferred in a specific amount of time. Raw throughput is the sum of all data being passed through the adapter wherein scaled throughput is the amount of Ethernet data moved per host processor cycle. TCP segmentation offloading for the average user typically means higher Ethernet data raw throughput, higher Ethernet data scaled throughput, and reduced host processor utilization.
In current TCP segmentation offload implementations, the host TCP stack is notified by the network interface card driver that the network interface card supports TCP segmentation offload. The host TCP stack then autonomously decides whether to create large TCP segments using size-based algorithms. For example, if the host TCP stack is given a 4 KB data buffer to transmit or many smaller data buffers during a very short time period, the host TCP stack can decide to create a single large TCP segment or large send packet.
A significant limitation of TCP segmentation offload is that for some network interface cards, most notably those network interface cards which implement TCP segmentation offload in microcode, the raw Ethernet throughput is actually lower when TCP segmentation offload is enabled. This limitation is due to the fact that the network interface card's processor is unable to perform the TCP segmentation offload function at a sufficient rate. In this case, the Ethernet scaled throughput may still increase due to the fact that fewer host processor cycles are being consumed by the host TCP stack, but raw Ethernet throughput will decrease.
If the host processor is not fully utilized, it is better to not to have TCP segmentation offload enabled, in order to gain better RAW Ethernet throughput performance. However, if the host processor is fully utilized and therefore impacting application performance, response times, and overall system performance, enabling the TCP segmentation offload feature reduces the host processor utilization.
An additional limitation of TCP segmentation offload is that in order to enable or disable this feature, the network interface card driver requires reconfiguration in order to notify the host TCP stack of offload capability features. This may lead to wasted time and expense in addition to unnecessary network downtime. The user is forced to choose between the two non-dynamic states possible: processor driven TCP segmentation with increased Ethernet performance or network interface card driven TCP segmentation offloading with slightly lower Ethernet performance with the advantage of freed processor cycles.